#include "./Poller.h"
#include "./Channel.h"

Poller::Poller(EventLoop *loop) : loop_(loop)
{
}

bool Poller::hasChannel(Channel *chan) const
{
    auto it = this->fdToChanMap_.find(chan->getFd());
    // 注意找到且地址相同
    return it != this->fdToChanMap_.end() && it->second == chan;
}